package com.force.module.webserver.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@SaIgnore
public class SingleAppController {


    @SaIgnore
    @RequestMapping(value = "/{path:[^\\.]*}")
    public String redirect() {
        return "forward:/";
    }




    @RequestMapping(value = "/")
    @SaIgnore
    public ModelAndView index() {
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.setViewName("index");
        modelAndView.addObject("user","sa");
        modelAndView.addObject("password","123456");
        return modelAndView;
    }

    @RequestMapping(value = "/publish")
    @SaIgnore
    public String publish() {
        return "forward:/";
    }

}
